//
//  XLCarPlateInputAccessoryViewCell.m
//  XLCarPlateInputViewDemo
//
//  Created by ilongge on 2020/10/22.
//

#import "XLCarPlateInputAccessoryViewCell.h"
#import "XLCarPlateKeyBoardDefine.h"

@interface XLCarPlateInputAccessoryViewCell()

@property (weak, nonatomic) IBOutlet UILabel *title;

@end

@implementation XLCarPlateInputAccessoryViewCell

- (void)awakeFromNib
{
    [super awakeFromNib];
    self.layer.borderWidth = 1.0;
    self.layer.borderColor = UIColorFromHex(0xCECECE).CGColor;
}

- (void)configText:(NSString *)title andActive:(BOOL)isActive
{
    self.title.text = title;
    
    if ([title isEqualToString:@"新能源"])
    {
        self.title.font = [UIFont systemFontOfSize:9];
    }
    else
    {
        self.title.font = [UIFont systemFontOfSize:25 weight:UIFontWeightMedium];
    }
    
    if (isActive)
    {
        self.title.backgroundColor =  UIColorFromHex(0xB1DEFF);
    }
    else
    {
        self.title.backgroundColor = [UIColor whiteColor];
    }
}

@end
